<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title><?php echo $title ?></title>
     <?php foreach ($styles as $file) echo HTML::style($file),
  "\n" ?>
    <?php foreach ($scripts as $file) echo HTML::script($file), "\n" ?>
</head>
<body>
<div class="container">
    <ol class="breadcrumb">
        <li>欢迎您</li>
        <li class="active"><a href="/admin/sys/index"><?php echo $username?></a></li>
    </ol>
    <nav class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-header">
            <a class="navbar-brand" href="/admin/sys/index">在线管理系统</a>
        </div>
        <div>
            <ul class="nav navbar-nav">
                <li><a href="/admin/sys/index">首页</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        个人信息<b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="/admin/sys/alertPwd">修改密码</a></li>
                        <li><a href="/admin/sys/logout">注销</a></li>
                    </ul>
                </li>
                <?php if(!empty($usermodel)):?>
                <?php foreach ($usermodel as $ukey => $pmodel):?>
                    <?php if(empty($pmodel['pid'])):?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <?php echo $pmodel['caption']?><b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <?php foreach ($usermodel as $ckey => $cmodel):?>
                            <?php if($cmodel['pid']==$pmodel['sysmodelid']):?>
                                <li><a href="<?php echo $cmodel['url']?>"><?php echo $cmodel['caption']?></a></li>
                            <?php endif;?>
                            <?php endforeach;?>
                        </ul>
                    </li>
                    <?php endif;?>
                <?php endforeach;?>
                <?php endif;?>
            </ul>
        </div>
    </nav>
    <ol class="breadcrumb">
        <li><a href="/admin/<?php echo $controller."/index" ?>"><?php echo $ptitle ?></a></li>
        <li class="active"><a href="/admin/<?php echo $controller."/".$action ?>"><?php echo $title ?></a></li>
    </ol>
    <div class="content">
        <?php echo $content?>
    </div>
    <div class="footer">Post By Fenglin</div>
</div>
<div class="op"></div>
<div id="list_loading" rel="loaded"><span></span>Loading...</div>

</body>
</html>
